//2009/08/19 15:37:42
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class ThreeCardMonte
{
public:
    string position(string swaps)
    {//LEFLRERERFREREELFFFLFRLRLEFREEEEFEFRRLLFFFFLELL
        char dex = 'M';
        for (int i=0; i<swaps.size(); i++)
        {
            switch (swaps[i])
            {
            case 'L':
                if (dex == 'L') dex = 'M';
                else if (dex == 'M') dex = 'L';
                break;
            case 'R':
                if (dex == 'M') dex = 'R';
                else if (dex == 'R') dex = 'M';
                break;
            case 'E':
                if (dex == 'L') dex = 'R';
                else if (dex == 'R') dex = 'L';
                break;
            }
			cout << dex << endl;
        }
		string s;
		s += dex;
		return s;
    }
};
